package com.yuan.yblog.portal.service;
import com.yuan.yblog.crud.entity.Category;
import com.yuan.yblog.crud.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 13527
 * @description 针对表【category】的数据库操作Service实现
 * @createDate 2023-12-03 14:18:01
 */
@Service
public class CategoryService{

    @Autowired
    ICategoryService iCategoryService;

    public List<Category> listAll() {
        return iCategoryService.getBaseMapper().selectList(null);
    }

    public Category selectOne(Long id) {
        return iCategoryService.selectByIdAndBuildCache(id);
    }
}




